package com.ecoolex.chinadutyfree.retailer.core.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.ecoolex.chinadutyfree.retailer.core.mapper.DirectMailGoodsMapper;
import com.ecoolex.chinadutyfree.retailer.entity.DirectMailGoods;
import com.ecoolex.chinadutyfree.retailer.pojo.QueryDirectMailGoodsDTO;
import com.ecoolex.framework.common.pojo.Page;

public interface DirectMailGoodsDAO extends DirectMailGoodsMapper {
	
	long count(@Param("query") QueryDirectMailGoodsDTO query);
	
	List<DirectMailGoods> query(@Param("query") QueryDirectMailGoodsDTO query,@Param("sortsOrder") String sortsOrder, @Param("page") Page page);
	
	long countByPosition(@Param("position") String position,@Param("positionValue") String[] positionValue);
	
	List<DirectMailGoods> queryByPosition(@Param("position") String position,@Param("positionValue") String[] positionValue,@Param("sortsOrder") String sortsOrder, @Param("page") Page page);
	
	long countByCategory(@Param("categoryId") Integer categoryId);
	
	List<DirectMailGoods> queryByCategory(@Param("categoryId") Integer categoryId,@Param("sortsOrder") String sortsOrder, @Param("page") Page page);
	
	long countByFirstCategory(@Param("categoryId") Integer categoryId);
	
	List<DirectMailGoods> queryByFirstCategory(@Param("categoryId") Integer categoryId,@Param("sortsOrder") String sortsOrder, @Param("page") Page page);

	long countByBrandId(@Param("name") String name,@Param("brandId") Integer brandId);
	
	List<DirectMailGoods> queryByBrandId(@Param("name") String name,@Param("sortsOrder") String sortsOrder,@Param("brandId") Integer brandId, @Param("page") Page page);
}